#ifndef PLAYSTATE_H
#define PLAYSTATE_H

#include <vector>
using namespace std;
#include "State.h"

#define BUTTON_SPITE_WIDTH 120
#define BUTTON_SPRITE_HEIGHT 40
#define W_HEAD_BACK_SPRITE 128

#define X_B_HINT 20
#define Y_B_HINT 430
#define X_B_OPTION 180
#define Y_B_OPTION Y_B_HINT

#define X_SCORE_BOARD 280
#define Y_SCORE_BOARD 20

#define X_GAME_TIMER 10
#define Y_GAME_TIMER 410
#define W_GAME_TIMER 300
#define H_GAME_TIMER 12

#define X_BACK_OPT 30
#define Y_BACK_OPT 130

#define X_DISTANCE 45

#define X_B_NEW_GAME X_BACK_OPT + 75
#define Y_B_NEW_GAME Y_BACK_OPT + 30

#define X_B_RETURN_TO_MAIN_MENU X_B_NEW_GAME
#define Y_B_RETURN_TO_MAIN_MENU Y_B_NEW_GAME + X_DISTANCE

#define TIME_DECREASE_WHEN_USE_HINT 10

class Board;
class GameTimer;
class ScoreBoard;
class Button;
class AnimationSprite;
class Texture;
class Box;
class Level;

class PlayState:public State
{
public:
	static PlayState* GetInstance();
	~PlayState();

	ScoreBoard* scoreBoard;
	GameTimer* gameTimer;

	void Init();
	void Update();
	void Render();
	void Exit();
	void TouchUp (int x, int y);
	void TouchDown (int x, int y);
	void TouchMove (int x, int y);

	void Destroy();

	void Render(int x, int y, float deep);
	void Render(int x, int y, float alpha, float deep);
	void Render(int x, int y, float xScale, float yScale, float angle, float alpha,float deep);

	void Reset();
	void OnButtonClick(Button* sender, int event);

private:
	static PlayState* instance;
	PlayState();
	Board* board;
	Button* bHint, *bOption;
	Button* bNewGame, *bReturnToMainMenu;
	AnimationSprite* asButton;
	bool isPlaying;
	Texture* optionBack;
	Texture* headBack;
	
	
	
};

#endif